# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

pkgname=hamlib
pkgver=4.5.5
pkgrel=3
pkgdesc='Ham radio equipment control libraries'
arch=('loong64' 'x86_64')
url='https://hamlib.github.io'
license=('GPL' 'LGPL')
depends=('perl' 'python' 'lua' 'tcl' 'libxml2' 'libusb-compat' 'libtool' 'libuhd' 'libindi')
makedepends=('swig')
source=("https://github.com/Hamlib/Hamlib/releases/download/$pkgver/$pkgname-$pkgver.tar.gz"{,.asc})
sha512sums=('2cdff2630e89fa95c7ac40e998492e8a04e000fcca18b9491ddcb967927ffaa771ed2e6ac3232a060947883533a6ae7405042a2f8fdb1de157d71f74381f5899'
            'SKIP')
validpgpkeys=('82D64F6B0E67CD41F689BBA6FB2C5130D55A8819') # Nate Bargmann <n0nb@n0nb.us>

build() {
  cd $pkgname-$pkgver

  ./configure \
  	--prefix=/usr \
  	--sbindir=/usr/bin \
  	--with-perl-binding \
  	--with-python-binding \
  	--with-tcl-binding \
  	--with-lua-binding \
  	--with-xml-support \
  	--disable-uhd  # https://github.com/Hamlib/Hamlib/issues/355

  make
}

package() {
  cd $pkgname-$pkgver

  make DESTDIR="$pkgdir" install
}
